package org.budo.github.api;

import org.budo.github.api.response.GithubUserResponse;
import org.budo.support.http.client.HttpUtil;
import org.budo.support.http.client.Response;

/**
 * @author lmw
 */
public class GithubUserApi {
    public GithubUserResponse user(String accessToken) {
        String url = "https://api.github.com/user?access_token=" + accessToken;
        Response userResponse = HttpUtil.get(url);
        return new GithubUserResponse(userResponse);
    }
}